programming4us
           
 
 
Windows Server

Windows Server 2008 Server Core : Accessing DLLs Using the RunDLL32 Utility

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
10/22/2010 6:12:03 PM
It's easy to think of a command as a built-in function within CMD.EXE and a utility as an external application that you run. However, the command line presents a third alternative, one that you might not have ever considered. The RunDLL32.EXE file is a utility that you can't run directly. Instead, you feed it a DLL that contains one or more externally accessible functions and add any arguments that the function requires as part of your input. For example, let's say you want to add a beep to your batch file. You can use the MessageBeep() function found in the User32.DLL file by adding this command to a batch file or script.
RunDLL32 User32.DLL,MessageBeep

Notice that you type the utility name, RunDLL32, followed by the name of the DLL, User32.DLL, and the name of the function, MessageBeep(). Note that the capitalization of the function you call is important; MessageBeep isn't the same as messagebeep.

You have many resources for learning how to use this particular command line feature. The best place to begin learning is the registry. Simply open the RegEdit utility and search for RunDLL32 entries by selecting the Edit Find command and typing RunDLL32 in the Find What field. Figure 1 shows a typical entry. In this case, the example shows how to install a new screen saver using the RunDLL32 utility (a handy thing to know since there isn't any way to do it from the user interface).

Notice that, in this case, you pass the name of the screen saver file to the function. Replace any variable entries, %1 in this case, with the actual filename you want to use when working at the command line. You'll find a wealth of RunDLL32 tips online, including suggested commands. Make sure you always understand what a command will do and verify its functionality before you actually use it. Some wannabe comedians use their Web sites to get you to do odd and dangerous things to your computer. One of the better Web sites to try is Using Rundll at http://www.ericphelps.com/batch/rundll/.

Figure 1. DLLs provide a lot of hidden functionality that you can access with RunDLL32.

The registry might not contain a solution for every need. You can look at the DLLs directly using an application such as Depends (Dependency Walker). You can't use the Dependency Walker at the Server Core console, but you can use it at a client machine. This particular utility is used so often by developers that it has its own Web site at http://www.dependencywalker.com/ with appropriate download links for various platforms. Figure 2 shows a typical view of a DLL opened in the Depends utility. Most of the information displayed in this figure has nothing to do with the command line and you can ignore it. However, the second window on the right side of the display shows the list of functions in the DLL.

Figure 2. Look for interesting functions to run in DLLs using the Depends utility.

Of course, Depends won't tell you what task the function performs or how to use it. To an extent, you're left on your own as far as usage details and you'll definitely want to spend time online looking for suggestions. However, you can get complete details on the function when working with any Microsoft DLL on the MSDN Library Web site at http://msdn.microsoft.com/library/. Simply type the function name in the Search For field and click Search. Other vendors usually provide similar documentation that you can use to learn more about the functions on their Web sites within DLLs.

Server Core (and most newer versions of Windows) places significant security restrictions on users. Consequently, some RunDLL32 solutions that worked in the past might not work today. Always test a RunDLL32 solution using the same privileges as the anticipated user, rather than your own privileges, which are likely more inclusive.

Other -----------------
- Windows Server 2008 Server Core : Configuring the Server for Initial Use
- Windows Server 2008 : Configuring Terminal Services (part 3)
- Windows Server 2008 : Configuring Terminal Services (part 2)
- Windows Server 2008 : Configuring Terminal Services (part 1)
- Windows Server 2008 : Deploying a Terminal Server (part 2) - Specifying NLA Settings
- Windows Server 2008 : Deploying a Terminal Server (part 1)
- Windows Server 2008 : Configuring Server Clusters (part 2)
- Windows Server 2008 : Configuring Server Clusters (part 1)
- Windows Server 2008 : Configuring Server Storage (part 3) - Configuring a Mount Point
- Windows Server 2008 : Configuring Server Storage (part 2) - Managing Disks, Volumes, and Partitions
- Windows Server 2008 : Configuring Server Storage (part 1)
- Use the Microsoft Management Console (MMC)
- Manage Windows Server 2008 : Work with Preconfigured MMCs
- Manage Windows Server 2008 : Work with the Task Scheduler
- Manage Windows Server 2008 Using Remote Desktop
- Manage Windows Server 2008: Configure Backups and Perform Restores
- Windows Server 2008 : Determine Which Terminal Services Roles to Install
- Windows Server 2008 : Install the TS Gateway Role Service and TS Web Access Role Service
- Windows Server 2008 : Install the TS Licensing Role Service
- Windows Server 2008 : Install the Terminal Server Role Service
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us